﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CreatePost.ascx.cs" Inherits="Web_Pages_UserControls_CreatePost" %>
<style type="text/css">
    .style1
    {
        width: 700;
    }
    .style2
    {
        width: 59px;
    }
</style>
<table>
    <tr>
        <td>
            Chủ đề:
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtContents" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td>
            Độ ưu tiên:
        </td>
        <td>
            <asp:RadioButton runat="server" ID="rbPrivate" Text="Riêng tư" GroupName="Privacy"/> <asp:RadioButton runat="server" ID="rbPublic" Text="Chia sẽ" GroupName="Privacy" Checked="true"/>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <asp:Button runat="server" ID="btnPost" Text="Đăng bài" onclick="btnPost_Click"/>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:DataList ID="DataList1" runat="server" Width="646px">
                <ItemTemplate>
                    <table class="style1">
                        <tr>
                            <td class="style2" rowspan="3">
                                <asp:Image ID="imgAvatar" runat="server" Height="39px" 
                                    ImageUrl='<%# Eval("Avatar","../../Images/{0}") %>' Width="52px" />
                            </td>
                            <td>
                                <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("Username") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblContents" runat="server" Text='<%# Eval("Contents") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
        </td>
    </tr>
</table>